import { useState } from "react";

const useTable = () => {
  const [total, setTotal] = useState<number>(1);
  const [page, setPage] = useState(1);
  const [num, setNum] = useState(10);

  const pageChange = (page: number) => {
    console.log(page);
    setPage(page);
  };

  const sizeChange = (currnet: number, size: number) => {
    console.log(size);
    setNum(size);
  };

  return [total, setTotal, page, num, pageChange, sizeChange];
};

export default useTable;
